-- GENERATED SPELL FOR [Grand Inquisitor Isillien] --


function spell0_1840(pUnit, Event) --@Dominate Mind,n/a--
pUnit:FullCastSpellOnTarget(14515,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1840', 17000, 1)
end

function spell1_1840(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(10917,pUnit)
pUnit:RegisterEvent('Sorts_1840', 1500, 1)
end

function spell2_1840(pUnit, Event) --@Greater Heal,Heal--
pUnit:FullCastSpellOnTarget(10965,pUnit)
pUnit:RegisterEvent('Sorts_1840', 3000, 1)
end

function spell3_1840(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(15800,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1840', 3000, 1)
end

function spell4_1840(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(17194,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1840', 1500, 1)
end

function spell5_1840(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(17165,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1840', 3000, 1)
end

function spell6_1840(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(10901,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1840', 30000, 1)
end

function Sorts_1840(pUnit, Event)
local choix_sorts_1840 = math.random(0, 6)
if choix_sorts_1840 == 0 then
pUnit:RegisterEvent('spell0_1840', 1, 1)
end
if choix_sorts_1840 == 1 then
pUnit:RegisterEvent('spell1_1840', 1, 1)
end
if choix_sorts_1840 == 2 then
pUnit:RegisterEvent('spell2_1840', 1, 1)
end
if choix_sorts_1840 == 3 then
pUnit:RegisterEvent('spell3_1840', 1, 1)
end
if choix_sorts_1840 == 4 then
pUnit:RegisterEvent('spell4_1840', 1, 1)
end
if choix_sorts_1840 == 5 then
pUnit:RegisterEvent('spell5_1840', 1, 1)
end
if choix_sorts_1840 == 6 then
pUnit:RegisterEvent('spell6_1840', 1, 1)
end
end

function mob1840_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1840', math.random(1500, 3000), 1)
end

function mob1840_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1840_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1840_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1840, 1, 'mob1840_Action')
RegisterUnitEvent(1840, 2, 'mob1840_Leave')
RegisterUnitEvent(1840, 3, 'mob1840_Kill')
RegisterUnitEvent(1840, 4, 'mob1840_Die')
